home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 7_10.lha / 7_10 / p_wait.c < prev    next >
Text File  |  1993-08-08  |  857b  |  32 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <process.h>
  6. include <debug.h>    /* DELETE */
  7. / pause until one of the objects
  8. / listed becomes available.
  9. nt process::wait(process_object *obj0, process_object *obj1,
  10.     process_object *obj2, process_object *obj3,
  11.     process_object *obj4, process_object *obj5)
  12.  
  13.    if (debug) /*DELETE*/ cerr << "process" << this << "::wait(...)\n";
  14.    if (mustrecurse())
  15. return wait(obj0, obj1, obj2, obj3, obj4, obj5);
  16.  
  17.    else
  18. {
  19. process_object *nwaitvec[7];
  20. nwaitvec[0] = obj0;
  21. nwaitvec[1] = obj1;
  22. nwaitvec[2] = obj2;
  23. nwaitvec[3] = obj3;
  24. nwaitvec[4] = obj4;
  25. nwaitvec[5] = obj5;
  26. nwaitvec[6] = 0;
  27. int ret = wait(nwaitvec);
  28. if (debug) /*DELETE*/ cerr << "<<<< process" << this << "::wait(...) <- " << ret << "\n";
  29. return ret;
  30. }
  31.  
  32.